﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MVC.Helpers
{
    public class ChartTest
    {
        private static Packed container = new Packed();

        public static IChart Start()
        {
            return new Packed();
        }
    }

    public class Packed : IChart
    {
        public int Val { get; set; }

        public IChart Start()
        {
            Val++;
            return this;
        }

        public string Save()
        {
            int copy = Val;
            Val = 0;
            return copy.ToString();
        }
    }

    public interface IChart
    {
        string Save();
    }
}